<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        var str="NidfdegdHdrE";
        console.log(strChange(str));
        function strChange(str){
            var a=str.toLowerCase();
            var b=str.split("");
            var c=a.split("");
            var d=str.toUpperCase();
            var e=d.split("");
            for(var i=0;i<str.length;i++){
                if(b[i]==c[i]){
                    c[i]=e[i];
                }
            }
            str=c.join("");
            return str;
        }
    </script>
</head>
<body>
    
</body>
</html>